1. Field of the Invention
The present invention relates to an image processing apparatus for detecting a target object in an image and a method of processing an image.
2. Description of the Related Art
In the past, a specific object, such as a human face or body, was detected in an image through pattern matching. For example, a known image processing apparatus extracts local patterns by applying a matching pattern to the entire image as the size of the image is changed and calculates local characteristic values. Then, a human body is detected in the image on the basis of the sum of weighted local characteristics (for example, refer to Japanese Patent Laid-Open No. 2009-211311). A known image processing apparatus efficiently detects an object by dividing an image into sections and carrying out processing in accordance with the priority levels of the sections. The priority level of each section and each adjoining section in which a target object has been detected is set high (for example, refer to Japanese Patent Laid-Open No. 2008-234169). It has been known that the method of face detection can be changed depending on the orientation of the camera body (for example, refer to Japanese Patent Laid-Open No. 2010-088093). It is also known that an object can be tracked through template matching (for example, refer to Japanese Patent Laid-Open No. 2002-373332).
When a human body is detected by applying a matching pattern to the entire image, the processing load increases as the size of the image increases. For example, in a monitoring camera image, the object may move in any direction and not necessarily move in a direction in which the face and body of the object can be easily detected. The detection accuracy of human body detection using a specific matching pattern changes depending on the viewing angle and size of the object. When human body detection is performed by dividing an image into sections and setting priority levels of the divided sections on the basis of past detection results, an object may not be efficiently detected because the object moves. With monitoring cameras, processing load needs to be reduced to enable real-time processing.
With human body detection using a specific matching pattern, a human body may not be detected accurately, regardless of the image quality of the object. Even when the method of face detection is changed in accordance with the orientation of the camera body, the face region may not be accurately detected.